package com.jasmin.putnici;

import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;

import com.google.android.maps.MapActivity;

public class BaseActivity extends MapActivity {

	@Override
	protected boolean isRouteDisplayed() {
		return false;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
    	Intent i = null;
		switch (item.getItemId()) {
			case R.id.menu_home:
				i = new Intent(this, MainActivity.class);
            	startActivityForResult(i, 1);
            	setContentView(R.layout.activity_line);
				return true;
			case R.id.menu_map:
				i = new Intent(this, LineActivity.class);
            	startActivityForResult(i, 1);
            	setContentView(R.layout.activity_line);
				return true;
			default:
				    break;
		}
		return false;
	}
    
	@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
}
